package com.atguigu.eduservice.service;

import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.vo.CourseInfoVo;
import com.atguigu.eduservice.entity.vo.CoursePublishVo;
import com.atguigu.eduservice.entity.frontvo.CourseFrontVo;
import com.atguigu.eduservice.entity.frontvo.CourseWebVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author 仲夏夜
 * @since 2022-09-16
 */
public interface EduCourseService extends IService<EduCourse> {
    /**
     * 添加课程基本信息
     *
     * @param courseInfoVo
     * @return
     * @throws Exception
     */
    String saveCourseInfo(CourseInfoVo courseInfoVo) throws Exception;

    /**
     * 根据课程id查询课程基本信息
     *
     * @param courseId
     * @return
     * @throws Exception
     */
    CourseInfoVo getCourseInfo(String courseId) throws Exception;

    /**
     * 根据课程id修改课程基本信息
     *
     * @param courseInfoVo
     * @throws Exception
     */
    void updateCourseInfoById(CourseInfoVo courseInfoVo) throws Exception;

    /**
     * 根据课程id查询课程确认信息
     *
     * @param id
     * @return
     * @throws Exception
     */
    CoursePublishVo publishCourseInfo(String id) throws Exception;

    /**
     * 删除课程
     *
     * @param courseId
     */
    void removeCourse(String courseId) throws Exception;

    Map<String, Object> getTeacherFrontList(Page<EduCourse> pageCourse, CourseFrontVo courseFronVo);
    //根据课程id，编写sql语句查询课程信息
    CourseWebVo getBaseCourseInfo(String courseId);
}